# $Id: PKGBUILD 90008 2013-05-06 19:36:20Z foutrelis $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: jose <jose1711 [at] gmail (dot) com>

pkgname=caph
arch=('i686' 'x86_64')
pkgver=1.1
pkgrel=4
pkgdesc='Sandbox game based on physics which uses doodles as a primary gameplay element'
license=('GPL')
url='http://sourceforge.net/projects/caphgame/'
depends=('sdl' 'libgl' 'libpng')
makedepends=('mesa')
source=("http://sourceforge.net/projects/caphgame/files/caph/caphgame-${pkgver}/caph-${pkgver}.tar.bz2" 
        "caph.desktop")
md5sums=('dbc2cfbb5cd98a77c5b731515d3a77b9'
         '79c6448995026f77fd912dd109b50287')

build() {
  cd $srcdir/caph-${pkgver}/src
  ./confg
  ./build
}

package() {
  cd $srcdir/caph-${pkgver}/src
  mkdir -p $pkgdir/usr/{bin,share/{caph/maps,doc/caph}}
  install -D -m755 ./caph $pkgdir/usr/bin/caph
  install -D -m644 ../doc/caph/* $pkgdir/usr/share/doc/caph/ || true
  install -D -m644 ../share/caph/* $pkgdir/usr/share/caph/ || true
  install -D -m644 ../share/caph/maps/* $pkgdir/usr/share/caph/maps || true
  install -D -m644 $srcdir/caph.desktop $pkgdir/usr/share/applications/caph.desktop
  install -D -m644 ../share/caph/brush.png $pkgdir/usr/share/pixmaps/caph.png
}

# vim: sw=2:ts=2 et:
